package com.tencent.atk;

import com.tencent.atk.model.Configure;

import android.app.Application;
import android.content.res.Configuration;
import android.util.Log;

public class AtkApplication extends Application {
	private boolean isRunningTest = false;
	private String currentTestPackage = null;
	private static AtkApplication application;
	private Configure configure;
	
	@Override
	public void onCreate() {
		super.onCreate();
		Log.i(Constants.TAG, "App start");
		application = this;
		configure = new Configure(this);
	}
	
	public static AtkApplication getInstance() {
		return application;
	}

	@Override
	public void onConfigurationChanged(Configuration newConfig) {
		super.onConfigurationChanged(newConfig);
	}

	@Override
	public void onLowMemory() {
		super.onLowMemory();
	}

	@Override
	public void onTerminate() {
		super.onTerminate();
		Log.i(Constants.TAG, "App terminate");
	}
	
	public Configure getConfigure() {
		return configure;
	}

	public boolean isRunningTest() {
		return isRunningTest;
	}

	public void setRunningTest(boolean isRunningTest) {
		this.isRunningTest = isRunningTest;
	}

	public String getCurrentTestPackage() {
		return currentTestPackage;
	}

	public void setCurrentTestPackage(String currentTestPackage) {
		this.currentTestPackage = currentTestPackage;
	}

}
